package com.shihb.behavioralpatterns.visitorpattern;

import java.util.ArrayList;
import java.util.List;

/**
 *Description:
 *Version:1.0.0
 *@author shihb
 *@date 2020/7/27 1:02
 */
public class ObjectStructure {
  private List<Persion> persions=new ArrayList<>();
  public void addPersion(Persion persion){
    persions.add(persion);
  }
  public void removePersion(Persion persion){
    persions.remove(persion);
  }
  public void showAction(Action action){
    for(Persion p:persions){
      p.accept(action);
    }
  }

}
